# 定义goods
class Goods:
    def __init__(self, name, price):
        self.name = name
        self.price = price

    def info(self):
        print(f'名字:{self.name}, 单价:{self.price}')


# 定义phone
class Phone(Goods):
    def __init__(self, name, price, brand, os):
        # 调用父类的__init__方法
        super().__init__(name, price)
        self.brand = brand
        self.os = os

    def info(self):
        super().info()
        print(self.brand)
        print(self.os)


p1 = Phone('iPhone 13', 1999, 'apple', 'ios')
# print(p1.name)
# print(p1.price)
# print(p1.brand)
# print(p1.os)

print(p1.info())
